﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DataAnalyseTool.Model;

namespace DataAnalyseTool.Utilities
{
  public class ContextWeb
  {
    public static Users CurrentUser
    {
      get
      {
        return HttpContext.Current.Session["CurrentUser"] as Users;
      }
      set
      {
        HttpContext.Current.Session["CurrentUser"] = value;
      }
    }


    public static void LogoutCurrentUser()
    {

      HttpContext.Current.Session.Remove("CurrentUser");
      HttpContext.Current.Session.RemoveAll();

    }
  }
}